T_CONST ➔ ... ➔ ???   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
dl 0
loc 1
rs 10
c 0
b 0
f 0
nop 2
1
const { loadSignatures } = require('./methods')
2
3
const groupMethods = list => {
4
  return list.reduce((acc, raw) => {
5
    let [ group, name ] = raw.split('.')
6
7
    if (!acc[group]) {
8
      acc[group] = []
9
    }
10
11
    acc[group].push({
12
      name
13
    })
14
15
    return acc
16
  }, {})
17
}
18
19
const loadInfo = async groups => {
0 ignored issues
show
Bug introduced by
The variable async seems to be never declared. If this is a global, consider adding a /** global: async */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
20
  const keys = Object.keys(groups)
21
  const result = {}
22
23
  for (const key of keys) {
24
    result[key] = await loadSignatures(key, groups[key])
0 ignored issues
show
Bug introduced by
The variable await seems to be never declared. If this is a global, consider adding a /** global: await */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
25
  }
26
27
  return result
28
}
29
30
module.exports = { groupMethods, loadInfo }
31